//
//  ProjectCell.m
//  laowu
//
//  Created by Northwan on 15/4/30.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "ProjectCell.h"

@implementation ProjectCell

+ (instancetype)cellWithCollectionView:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath{
    
    UINib *nib = [UINib nibWithNibName:@"ProjectCell" bundle: [NSBundle mainBundle]];
    [collectionView registerNib:nib forCellWithReuseIdentifier:@"ProjectCell"];
    ProjectCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier: @"ProjectCell" forIndexPath:indexPath];
    [cell.layer setBorderWidth:0.5];
    [cell.layer setBorderColor:RGBColor(200, 200, 200).CGColor];
    [cell.layer setMasksToBounds:YES];
    [cell setBackgroundColor:[UIColor whiteColor]];
    //    HomeItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"HomeItemCell" forIndexPath:indexPath];
    return cell;
}

-(void)initData:(ProjectInfoResult *)result{
    [_projectImgView sd_setImageWithURL:[NSURL URLWithString:result.title_img]];
    [_projectTitle setText:result.name];
    [_projectPublishTime setText:result.releas_date];
}

@end
